const SWITCH = {
    API:0
}

const Constant = {
      PROTOCOL: "http",
      HOST: SWITCH.API?"116.62.47.61":'localhost',
      PREFIX: SWITCH.API? "jdy":"",
      PROT: "8080",
};

const ApiList = {
    Admin:"/admin/users/",
    Menus:"/admin/menus/",
    Categories:"/admin/categories/",
    Questions:"/admin/questions/",
    QuestionConfig:"/admin/questionsConfig/",
    InfoVerify:"/admin/infoVerify/",
    Banner:"/admin/banners/",
    Customer:"/admin/customerInfos/",
    Carrier:"/admin/carrierInfos/",
    Charge:"/admin/charges/",
    Tool:"/admin/tools/",
    Feedback:"/admin/feedback/",
    Chart:"/admin/charts/",
    Message:"/admin/message/",
    Order:"/admin/orderList/",
    QuickQuestion:"/admin/quickResponseList/",
    Withdraw:"/admin/withdraw/",
    Role:"/admin/roles/",
    Area:"/areas/",
    Protocol:"/admin/protocol/"
    
};

function Api(apiName){
    return Constant.PROTOCOL + "://" + Constant.HOST + ":" +  Constant.PROT +"/"+Constant.PREFIX+ ApiList[apiName];
}
function Prefix(){
    return Constant.PROTOCOL + "://" +  Constant.HOST + "/" ;
}
export default {
    Api,
    Prefix
}
